package com.cyh.server.config;

import com.cyh.server.service.DBQueryService;
import com.cyh.server.service.DatasourceService;
import com.cyh.server.service.WeatherService;
import jakarta.annotation.Resource;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author chenyuehua
 * @description
 * @date 2025/5/27
 **/
@Configuration
public class McpConfig {

    @Bean
    public ToolCallbackProvider datasourceServiceTools(DatasourceService datasourceService) {
        return MethodToolCallbackProvider.builder().toolObjects(datasourceService).build();
    }

    @Bean
    public ToolCallbackProvider dbQueryServiceTools(DBQueryService dbQueryService) {
        return MethodToolCallbackProvider.builder().toolObjects(dbQueryService).build();
    }
}
